cmake_minimum_required(VERSION 3.10)
project(lvgl)
set(CMAKE_C_STANDARD 11)#C11
set(CMAKE_CXX_STANDARD 17)#C17
set(CMAKE_CXX_STANDARD_REQUIRED ON)

option(AUTO_CCACHE "Use ccache to speed up rebuilds" ON)
find_program(CCACHE_PROGRAM ccache)
if (CCACHE_PROGRAM AND ${AUTO_CCACHE})
    message(STATUS "Using ${CCACHE_PROGRAM} as compiler launcher")
    set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
    set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
endif ()

include_directories(.)
file(GLOB_RECURSE SOURCES "lv_drivers/*.c" "lvgl/*.c")

add_compile_options(-O3 -Og)
add_compile_definitions(LV_CONF_INCLUDE_SIMPLE)

add_executable(main main.c mouse_cursor_icon.c ${SOURCES})
target_link_libraries(main SDL2)
